#include <iostream>
#include "renderer/MRenderer.h"
#include "objects/OrthoCamera.h"

int main(){
    std::cout<<"Hello mRender! version:"<< Config::M_VERSION.c_str() <<std::endl;
    MRenderer* mRenderer = MRenderer::getInstance();
    Scene* pScene = new Scene();
    Camera* camera = new OrthoCamera();
    pScene->add(camera);
    pScene->setActiveCamera(camera);

    Object3D* obj = new Object3D();
    BufferGeometry* geo = new BufferGeometry();
    geo->vertices = {
            0.0f, 0.5, 0.0f,
            0.0f, 0.0f, 0.0f,
            0.5f, 0.0f, 0.0f,
            0.5f, 0.5f, 0.0f
    };
    geo->colors = {
            1.0f, 0.0f, 0.0f, 1.0f,
            0.0f, 0.0f, 1.0f, 1.0f,
            1.0f, 1.0f, 0.0, 1.0f,
            1.0f, 1.0f, 1.0, 1.0f
    };
    geo->indices = {
            0, 1, 2,
            0, 2, 3
    };
    obj->geometries.push_back(geo);
    pScene->add(obj);

    mRenderer->render(pScene);
    return 0;
}
